package com.ymx.darling.type;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class ByteArrayHandler implements TypeHandler<byte[]> {
    @Override
    public byte[] getResult(ResultSet resultSet, int columIndex) throws SQLException{
        return resultSet.getBytes(columIndex);
    }

    @Override
    public void setParameter(PreparedStatement statement, byte[] value, int index) throws SQLException {
        statement.setBytes(index, value);
    }
}

